package com.woniu.dao;

import com.woniu.entity.Product;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ProductDao extends JpaRepository<Product,Integer> {
    //这个方法，是用户自定义的查询方法，相当于 where name = 'xx' or price between minPrice and maxPrice
    List<Product> findByNameOrPriceBetween(String name, double minPrice, double maxPrice);

}
